<!-- MainContent.vue -->
<template>
  <div class="main-content">
    <!-- 关于我的博客 -->
    <div class="about-me">
      <h3>关于我的博客</h3>
      <p>欢迎指教...</p>
      <p>发布于{{ aboutMeDate }}</p>
    </div>

    <!-- 文章列表 -->
    <div class="article-list">
      <div v-for="article in articles" :key="article.id" class="article-item">
        <h4>{{ article.title }}</h4>
        <p>{{ article.description }}</p>
        <p>发布于{{ article.date }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      aboutMeDate: '2023-03-17 07:09:51',
      articles: [
        {
          id: 1,
          title: 'node项目log4js进行日志记录',
          description: '安装与了解目前的版本是：6.6.1在终端打印消息...',
          date: '2022-09-11 06:57:00'
        },
        {
          id: 2,
          title: '从零开发ts装饰器管理koa路由',
          description: '前言两年前刚学ts，当时搭了个简单的koa的demo...',
          date: '2022-06-01 07:00:29'
        },
        {
          id: 3,
          title: 'ts项目从零配置eslint + prettier',
          description: '本篇文章介绍自己搭建的ts项目如何在不依赖脚手架的情况下配置eslint+prettier...',
          date: '2022-06-01 07:00:29'
        }
      ]
    };
  }
};
</script>

<style scoped>
.main-content {
  text-align: left;
}
.about-me {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  background-color: #fff;
  padding: 16px 25px;
  border-radius: 20px;
}
.about-me,
.article-list {
  margin-top: 20px;
}

.article-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  background-color: #fff;
  padding: 16px 25px;
  border-radius: 20px;
  margin-top: 20px;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item h4 {
  margin-bottom: 10px;
}

.article-item p {
  margin-bottom: 5px;
  color: #6c757d;
}
</style>